import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
// axios
import axios from '../src/utils/axios.js'

import './utils/nprogress.js'

// Mock
import './mock/'


// antdesign
import Antd from 'ant-design-vue';
import 'ant-design-vue/dist/antd.css';
// 富文本编辑器
import VueQuillEditor from 'vue-quill-editor'
import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css'
import qs from 'qs'
Vue.prototype.$qs = qs;

import common from '../src/utils/common.js'
Vue.prototype.common = common;//notify拿到的是一个 暴露出来的对象 对象中有封装好的这个方法  

// 字体
// import '../src/assets/font/iconfont.css';
Vue.config.productionTip = false
Vue.use(Antd)
Vue.use(VueQuillEditor)
Vue.prototype.$http = axios

Vue.prototype.isAuth = function (permission) {
  let flag = false
  let permissions = localStorage.getItem("permissions");
  if (permissions) {
    for (let one of permission) {
      if (permissions.includes(one)) {
        flag = true
        break;
      }
    }
  }
  return flag;
}

Vue.use(axios)
new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
